import request from '@/utils/request'

// 获取完整权限树
export const getRoleList = (data?: any) =>
  request({
    url: '/role/list',
    method: 'post'
  })
// 查看权限详情
export const roleView = (data?: any) =>
  request({
    url: '/role/view',
    method: 'post',
    data
  })
// 创建权限
export const roleCreate = (data?: any) =>
  request({
    url: '/role/create',
    method: 'post',
    data
  })
// 修改权限
export const roleUpdate = (data?: any) =>
  request({
    url: '/role/update',
    method: 'post',
    data
  })
// 删除权限
export const roleDelete = (data?: any) =>
  request({
    url: '/role/delete',
    method: 'post',
    data
  })
// 分配子节点
export const roleAssign = (data?: any) =>
  request({
    url: '/role/assign',
    method: 'post',
    data
  })
// 回收子节点
export const roleRevoke = (data?: any) =>
  request({
    url: '/role/revoke',
    method: 'post',
    data
  })
